Overview
These utilities modify the geospatial metadata and registration of equirectangular (and similar cylindrical) projections without resampling image data. This approach:- ✅ Preserves original pixel values exactly
- ✅ Avoids interpolation artifacts
- ✅ Executes rapidly (no pixel processing)
- ⚠️ Only works for specific projection types
NewCenterLon_Equi.py
Changes the center longitude (central meridian) without reprojecting.Usage
Output format (GDAL driver name: GTiff, HFA, ISIS3, etc.)
New center longitude value in decimal degrees
Path to input raster file
Path to output raster file
Examples
How It Works
Read projection information
Extract the current spatial reference system and geotransformation matrix
Use Cases
Global Map Conventions
Convert between -180° to 180° and 0° to 360° longitude systems
Seam Repositioning
Move the map edge seam to a different longitude
Regional Centering
Center the map on a specific feature or region of interest
Multi-Body Data
Standardize center longitude across planetary datasets
NewStandardPar_Equi.py
Changes the standard parallel (latitude of true scale) without reprojecting.Usage
Output format (GDAL driver name)
New standard parallel latitude in decimal degrees
Path to input raster file
Path to output raster file
Examples
How It Works
Result: The output may have rectangular pixels (different X and Y resolution) because only the X spacing is scaled.
Use Cases
Split Global Mosaics
Prepare latitude bands with appropriate scale for each zone
Regional Processing
Optimize scale distortion for specific latitude ranges
Conformality Adjustment
Match scale characteristics to analysis requirements
Legacy Data Correction
Update old maps with incorrect standard parallel metadata
Example Workflow: Global Lunar Split
The repository includes an example for splitting a global lunar map into 5-degree latitude bands: Files:global_lunar_split_example/NewStandardPar_Equi.pyglobal_lunar_split_example/split_equi_5deg_lat_bands.py
Technical Background
Equirectangular Projection
Also known as Plate Carrée or Simple Cylindrical, this projection maps:λ= longitudeλ₀= center longitude (central meridian)φ= latitudeφ₁= standard parallel (latitude of true scale)R= radius of the sphere/ellipsoid
Why No Resampling Works
Mathematical Explanation
Mathematical Explanation
Equirectangular projection has a linear relationship between pixel coordinates and ground coordinates. Changing the center longitude simply shifts all X coordinates by a constant amount:Similarly, changing standard parallel scales X coordinates uniformly:Because the pixel grid doesn’t need to be warped or rotated, we can simply update the geotransformation coefficients.
Geotransformation Update
Standard GDAL geotransform:geomatrix[0] (ulx)Standard parallel change: Modify
geomatrix[1] (xres)
Requirements
- Modern GDAL Python bindings:
from osgeo import gdal - Legacy bindings:
import gdal
Supported Output Formats
Common GDAL format codes for-of parameter:
GTiff
GeoTIFF (default)
HFA
Erdas Imagine .img
ISIS3
USGS ISIS3 cube
ENVI
ENVI .dat + .hdr
AAIGrid
Arc/Info ASCII Grid
JPEG
JPEG (loses georeferencing)
gdal_translate --formats for full list.
Validation
After running these scripts, verify the output:Credits
Author: Trent Hare, USGSBased on: tolatlong.py by Andrey Kiselev (dron@remotesensing.org)
Project: Lunar Mapping and Modeling Project (LMMP)
These scripts were developed for planetary mapping workflows but work equally well for terrestrial data in appropriate projections.